import $api from '@/http/api.js'

export default {
  namespaced: true,
  state: {
    imgsrc: ''
  },
  mutations: {
    UpImg(a, b) {
      a.imgsrc = b
    }
  },
  actions: {
    upImg(context, e) {
      $api.imgApi.upImg(e).then((v) => {
        console.log(v);
        context.commit('UpImg', v.data.data[0])
      });
    },
  },
}